﻿@{
    Layout = null;

    var moduleSEModel = ViewBag.moduleSEModel as NB.MGJ.Model.Origins_ModuleSE;
    var materialModel = ViewBag.materialModelas as NB.MGJ.Model.Origins_ModuleSE;
    var exDic = ViewBag.exDic as Dictionary<string, string>;


    var Fw_SecretCode = ViewBag.Fw_SecretCode;
    
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>标准版</title>


    <link href="~/Content/TraceSource/ExperienceCenter.css" rel="stylesheet" />
    <link href="~/Content/TraceSource/tpcj_se.css" rel="stylesheet" />
    <link href="~/Content/TraceSource/style_se.css" rel="stylesheet" />
    <link href="~/Content/TraceSource/form_se.css" rel="stylesheet" />
    <link href="~/Content/CommonCss/BootStrap/bootstrap.css" rel="stylesheet" />


    <style>
        .RichWrap img
        {
            width: 100%;
        }

        .phone-con-bar img
        {
            width: 100%;
            height: auto;
        }
    </style>



</head>
<body>
    <div>

        <h3 class="phone-title">
            <span class="iconfont icon-jiantou1 back-icon" style="margin-left:20px;">
            </span> 产品详情
        </h3>
        <div class="phone-con-bar">
            @if (moduleSEModel.Picture == "")
            {
                <img src="~/Content/Images/ico-nav/default/product-logo-default.png" class="phone-pro-pic show-img" />
            }
            else
            {
                <img src="@moduleSEModel.Picture" class="phone-pro-pic show-img" />
            }

            @*<div class="phone-pro-name-bar">
                    <h3 class="phone-pro-name" id="phone-product-name">产品名称：@moduleSEModel.ProductName</h3>
                    <p class="phone-pro-brand" id="phone-brand">
                        请选择批次
                    </p>
                </div>*@
            @*<div class="format-bar">
                    规格参数
                </div>*@
            <ul class="format-ul clearfix">
                <li>
                    <span class="format-name">产品名称：</span>
                    <span class="format-con" id="phone-product-name">@moduleSEModel.ProductName</span>
                </li>

                <li>
                    <span class="format-name">产品编号：</span>
                    <span class="format-con" id="phone-product-bar">@moduleSEModel.ProductCode</span>
                </li>
                <li>
                    <span class="format-name">产地：</span>
                    <span class="format-con" id="phone-product-place">@moduleSEModel.ProduceArea</span>
                </li>
                <li>
                    <span class="format-name">规格：</span>
                    <span class="format-con" id="phone-product-format">@moduleSEModel.Format</span>
                </li>



                @if (exDic != null && exDic.Count > 0)
                {
                    foreach (KeyValuePair<string, string> item in exDic)
                    {
                        <li class="mobile-hidden-li mobile-show-li">
                            <span class="format-name">@item.Key：</span>
                            <span class="format-con">@item.Value</span>
                        </li>
                    }
                }

                <li class="RichWrap">
                    @Html.Raw(moduleSEModel.ShortDescription)
                </li>


            </ul>
        </div>

        <p>技术支持：码管家云系统&nbsp;版权所有</p>
    </div>


    <div style="width: 100%; height: 50px;"></div>
    <div style="width: 100%; height: 50px; position: fixed; bottom: 0; left: 0; background: #444; display: flex; justify-content: space-around; align-items: center; ">
        <div class="col-sm-9" style="width:100%">
            <input type="text" id="verCode" placeholder="请输入4位验证码查真伪" class="form-control" />
            <input type="hidden" id="Fw_SecretCode" value="@Fw_SecretCode" />
        </div>
        <div class="col-sm-3">
            <button class="btn btn-success form-control" id="search">查询真伪</button>
        </div>
    </div>



</body>
</html>
@*<script src="~/Scripts/jquery.js"></script>*@
<script src="~/Scripts/jquery-3.3.1.min.js"></script>
<script>


    $("#search").click(function () {
      
        FwSearch();

    })




    function FwSearch() {

        var Fw_SecretCode = $("#Fw_SecretCode").val();
        var searchType = "Fw_CodeSecret";
        var verCode = $("#verCode").val();

        $.ajax({
            url: "/CodeSearch/ValidateCodeLastFour",
            type: "POST",
            dataType: "json",
            data: { code: Fw_SecretCode, verCode: verCode },
            success: function (data) {
         
                if (data) {


                    //$(_this).attr("href", "/CodeSearch/AntifakeSearchResult?code=" + code + "&type=" + searchType + "&verCode=" + verCode);
                    window.location = "/CodeSearch/AntifakeSearchResult?code=" + Fw_SecretCode + "&searchType=" + searchType + "&verCode=" + verCode


                } else {

                    alert("验证码错误")


                }




            }




        });


    }





</script>